import service from '@/utils/request'

const AttrApi = {
  listAttr:function(data){
    return service.get('attr/page', {params:data})
  },
  addAttr:function(data){
      return service.post('attr', data)
  },
  editAttr:function(data){
      return service.put('attr', data)
  },
  deleteAttr:function(data){
      return service.put('attr/delete', data)
  },
  getAttrInfo(data){
      return service.get('attr', {params:data})
  },
  listIdName:function(data){
    return service.get('attr/listIdName', {params:data})
  },
  updateRelations:function(data){
    return service.put('attr/updateRelations', data)
  },
  batchUpdateRelations:function(data){
    return service.put('attr/batchSetRelations', data)
  },
  attrList:function(data){
    return service.get("attr/list",{params:data})
  },
  attrRelationList:function(data){
    return service.get("attr/listRelation",{params:data})
  },

}

export default AttrApi
